<?php
include "../config/koneksi.php";
include "../class/toko.php";

$toko_dao=new Toko_Dao();
$list=$toko_dao->get_all();

?>
<html>
<head>
<title>List Toko</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
  <tr> 
      
    <td height="30""> 
      <div align="left"><font size="3" face="tahoma">Manajemen Toko</font><br></font><hr color=#CCCCFF>
      <a href=index.php?menu=input_toko>
<input type=submit value="Tambah Toko"></a></div></td>
    </tr>
  </table>
  <br>
<div align=center>
	<table class="table table-bordered">
<div align=center>
<table border=1 cellpadding=0 cellspacing=0 style=border-collapse: collapse width=100% id=AutoNumber1>
		<tr>
			<td width=3% bgcolor=#999999>
			<font face=Tahoma color=#FFFFFF size=2>No.</font></td>
			<td width=17% bgcolor=#999999 align=center>
			<font face=Tahoma color=#FFFFFF size=2>Nama Toko</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=15%>
			<font face=Tahoma color=#FFFFFF size=2>Alamat</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Kota</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Kode Pos</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Telepon</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Email</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Rekening Bank</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Cabang</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Atas Nama</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Nomor Rekening</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=30%>
			<font face=Tahoma color=#FFFFFF size=2>Deskripsi Toko</font></td>
			
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium colspan=3 width=15%>
			<font face=Tahoma color=#FFFFFF size=2>Aksi</font></td>
		</tr>

	<?php
	$i=1;
	foreach($list as $list2){
	$id_toko=$list2->id_toko;

	?>
	<tr>
		<td width=3% style=border-style: none; border-width: medium align=center valign=top><font face=Tahoma size=2><?php echo $i;?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=left valign=top><?php echo $list2->nama_toko; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->alamat; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->kota; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->kodepos; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->telp; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->email; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->nama_bank; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->cabang; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->atas_nama; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->rek; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=center valign=top><?php echo $list2->deskripsi_toko; ?></font></td>
		<td><?php echo "<a href=index.php?menu=edit_toko&id_toko=$id_toko title='Edit Toko'><img border=0 src=../images/edit.png></a>";?></td>
		<td><?php echo "<a href=index.php?menu=hapus_toko&id_toko=$id_toko title='Hapus Toko'><img border=0 src=../images/delete.png></a>";?> </td>
	</tr>
<?php $i++;}?>

	</table>
</body>
</html>